Rules - Concept


The basic function of Welcome is modifying requests "on the fly"before the server will see them. I have extended this function to a user-definable feature: rules.

Before I explain rules in detail, I would like to show how things happen if a request comes in and gets processed:

  1. Virtual hosting is done, until a request is ready to be processed by your server.
  2. This request will go through all defined rules. You can think of rules as instructions on what to do with the request. The rule list will be the instruction list, that is processed one step after each other.
  3. Each rule has access to five basic input parameters: Path, Host, Referer, Language and Browser. These are values that were extracted out of the request header.
  4. Each rule has a definable condition that decides if the rule will be executed or if this rule will be skipped.
  5. Each rule can do a powerful search/replace with the input parameters. It can build (or modify) the request path or even redirect it.
  6. Each rule can stop processing the rule list or jump to a specific position in the rule list. This will enable you to create loops or terminate with a specific rule.

Some web problems might need a single rule to fix them - others will need several rules that work together to modify the request or stop/skip other rules.

I know that rules are somewhat difficult to understand, but once you have understood them, you could never live without them. To help understanding rules, I have created a test page, where rules can be tested remotely. This and a collection of "ready to use" rules will give you a starting point, but I recommend playing around and asking other users on the mailing list if you got stuck.